package sjtu.ist.warehouse4ws.action;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

import com.opensymphony.xwork2.ActionSupport;

public class UserLogoutAction extends ActionSupport {
	/**
	 *  登出 操作
	 */
	private static final long serialVersionUID = 1L;

	public String execute() {
		Subject currentUser = SecurityUtils.getSubject();
		if (currentUser != null) {
			currentUser.logout();
		}
		return SUCCESS;
	}
}
